<template>
<div>
    <div class="menuleft">
        <el-menu default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose">
            <el-menu-item index="1">
                <router-link to="/home">
                    <i class="icon iconfont icon-ziyuan"></i>返回首页
                </router-link>
            </el-menu-item>
            <el-menu-item index="3" v-if="permissions.indexOf('出纳工作台')>-1">
                <router-link to="/Entrance">
                    <i class="icon iconfont icon-c-finance"></i>&nbsp;出纳工作台
                </router-link>
            </el-menu-item>
            <el-menu-item index="5" v-if="permissions.indexOf('历史工作台')>-1">
                <router-link to="/HistoryTable">
                    <i class="icon iconfont icon-lishi"></i>&nbsp;历史工作台
                </router-link>
            </el-menu-item>
        </el-menu>
    </div>
    <router-view></router-view>
</div>
</template>
<script>
import {
    mapState,
    mapGetters
} from 'vuex'
export default {
    name: "Cashier",
    data() {
        return {
            permissItem: [],
        }
    },
    computed: {
        ...mapGetters({
            permissions: 'permissions'
        })
    },
    methods: {
        handleOpen(key, keyPath){
            console.log(key, keyPath);
        },
        handleClose(key, keyPath) {
            console.log(key, keyPath);
        }
    }
}
</script>
<style scoped>

</style>
